**# Bookmark #1 Setting

*Windows
global root  = "G:/Dropbox/Environmental Injustice/Empirical"
global rawdata = "$root/rawdata"
global workdata = "$root/workdata"
global results = "$root/results"
global outfile = "$root/outfile"

cd "$workdata"

**# Bookmark #2.1 Table S11 Panel A Column 1

use "$outfile/Table S11 Panel A Column 1.dta",clear

reghdfe codemission c.lnincome2000##i.post,absorb(i.city i.province#i.year) cluster(i.province i.year)
outreg2 using "$results/Table S11.xls",replace ctitle("COD Emission") ///
addtext(City FE, YES, Firm FE, NO, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)


**# Bookmark #2.2 Table S11 Panel A Column 2

use "$outfile/Table S11 Panel A Column 2.dta",clear

reghdfe codemission c.lnincome2000##i.post,absorb(i.id i.province#i.year) cluster(i.province i.year)
outreg2 using "$results/Table S11.xls",append ctitle("COD Emission") ///
addtext(City FE, NO, Firm FE, YES, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)

**# Bookmark #2.3 Table S11 Panel A Column 3

use "$outfile/Table S11 Panel A Column 3.dta",clear

reghdfe entrynum c.lnincome2000##i.post,absorb(i.city i.province#i.year) cluster(i.province i.year)
outreg2 using "$results/Table S11.xls",append ctitle("COD Emission") ///
addtext(City FE, YES, Firm FE, NO, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)

**# Bookmark #2.4 Table S11 Panel A Column 4

use "$outfile/Table S11 Panel A Column 4.dta",clear

reghdfe exitnum c.lnincome2000##i.post,absorb(i.city i.province#i.year) cluster(i.province i.year)
outreg2 using "$results/Table S11.xls",append ctitle("COD Emission") ///
addtext(City FE, YES, Firm FE, NO, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)

**# Bookmark #3.1 Table S11 Panel B Column 1

use "$outfile/Table S11 Panel B Column 1.dta",clear

reghdfe codemission c.notHan##i.post,absorb(i.city i.province#i.year) cluster(i.province i.year)
outreg2 using "$results/Table S11.xls",append ctitle("COD Emission") ///
addtext(City FE, YES, Firm FE, NO, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)

**# Bookmark #3.2 Table S11 Panel B Column 2

use "$outfile/Table S11 Panel B Column 2.dta",clear

reghdfe codemission c.notHan##i.post,absorb(i.id i.province#i.year) cluster(i.province i.year)
outreg2 using "$results/Table S11.xls",append ctitle("COD Emission") ///
addtext(City FE, NO, Firm FE, YES, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)

**# Bookmark #3.3 Table S11 Panel B Column 3

use "$outfile/Table S11 Panel B Column 3.dta",clear

reghdfe entrynum c.notHan##i.post,absorb(i.city i.province#i.year) cluster(i.province i.year)
outreg2 using "$results/Table S11.xls",append ctitle("COD Emission") ///
addtext(City FE, YES, Firm FE, NO, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)

**# Bookmark #3.4 Table S11 Panel B Column 4

use "$outfile/Table S11 Panel B Column 4.dta",clear

reghdfe exitnum c.notHan##i.post,absorb(i.city i.province#i.year) cluster(i.province i.year)
outreg2 using "$results/Table S11.xls",append ctitle("COD Emission") ///
addtext(City FE, YES, Firm FE, NO, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)